package com.dogstalks.main;

import java.util.ArrayList;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Canvas;
import android.graphics.Point;
import android.graphics.drawable.Drawable;
import android.util.Log;
import android.view.MotionEvent;
import android.widget.Toast;

import com.dogstalks.join.FindLocation;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.MapView;
import com.google.android.maps.OverlayItem;
import com.google.android.maps.Projection;

public class MarkerItemizedOverlay extends BalloonItemizedOverlay<OverlayItem> { // OverlayItem
	private Context mContext;
	private Drawable mMarker;

	private ArrayList<OverlayItem> mOverlays = new ArrayList<OverlayItem>();

	public MarkerItemizedOverlay(Drawable defaultMarker) {
		super(boundCenter(defaultMarker));
		mMarker = defaultMarker;
	}

	public MarkerItemizedOverlay(Drawable defaultMarker, MapView mapView) {
		super(boundCenter(defaultMarker), mapView);
		this.mMarker = defaultMarker;
		this.mContext = mapView.getContext();
	}

	public void addOverlay(OverlayItem overlay) {
		mOverlays.add(overlay);
		populate();
	}

	@Override
	protected OverlayItem createItem(int i) {
		// TODO Auto-generated method stub
		return mOverlays.get(i);
	}

	@Override
	public int size() {
		// TODO Auto-generated method stub
		return mOverlays.size();
	}

	public void removeItem() {
		mOverlays.clear();
	}
	
	

}
